package csc.daonjpa.java.domain;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;

@Entity
@PrimaryKeyJoinColumn(referencedColumnName = "number")
public class Card extends BaseInfo implements Serializable{
	
	private static final long serialVersionUID = 2L;
	
	private String cardType;
	private String bank;
	
	@ManyToOne()
	@JoinColumn(name = "custId")
	private Customer customer;
	
	/**
	 * 0-arg Constructor
	 * @param cardType
	 */
	public Card() {
		
	}

	public Card(String cardType, String bank) {
		this.cardType = cardType;
		this.bank = bank;
	}

	public String getCardType() {
		return cardType;
	}

	public void setCardType(String cardType) {
		this.cardType = cardType;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public String getBank() {
		return bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}
}
